import React from 'react'
import PropTypes from 'prop-types'
import { withRouter } from 'react-router-dom'
import { withStyles } from 'material-ui/styles'
import Edit from 'material-ui-icons/Edit';


import createStyle from './style'

class UserCenter extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
    }
    this.goPost = this.goPost.bind(this)
  }
  goPost() {
    this.props.history.push('/post')
  }
  render() {
    const {
      classes,
    } = this.props
    return (
      <div className={classes.postIcon} onClick={this.goPost}>
        <Edit />
      </div>
    )
  }
}
export default withRouter(withStyles(createStyle)(UserCenter))
UserCenter.propTypes = {
  classes: PropTypes.objectOf(Object),
  history: PropTypes.objectOf(Object),
}
